package com.zhengtoudai.ui.bean;

/**
 * 作者：黑哥 on 2016/8/24 17:27
 *
 * 统一管理 code message 等返回的参数
 */
public class HttpResult<T> {

    private String code;

    private String message;

    //用来模仿Data
    private T subjects;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getSubjects() {
        return subjects;
    }

    public void setSubjects(T subjects) {
        this.subjects = subjects;
    }


    @Override
    public String toString() {
        StringBuffer sb = new StringBuffer();
        sb.append("code=" + code + " message=" + message);
        if (null != subjects) {
            sb.append(" subjects:" + subjects.toString());
        }
        return sb.toString();
    }
}
